import { compose, createStore, Store } from 'redux';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { AppState, rootReducer } from './reducers/index';
import { AppStore } from './app-store';
import { ChatPageComponent } from './pages/chat-page/chat-page.component';

const store: Store<AppState> = createStore<AppState>(rootReducer);

@NgModule({
    declarations: [
        AppComponent,
        ChatPageComponent
    ],
    imports: [
        BrowserModule
    ],
    providers: [{ provide: AppStore, useValue: store }],
    bootstrap: [AppComponent]
})
export class AppModule { }
